home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Over 1,000 Windows 95 Programs
/
Over 1000 Windows 95 Programs (Microforum) (Disc 2).iso
/
0301
/
winprbil.bas
< prev
next >
Wrap
BASIC Source File
|
1997-03-30
|
6KB
|
196 lines
'WinPrbil.bas module for Trucklog For Windows 3.X by Charles MacDonald (C) 1996
'This file can be changed and compiled under QuickBasic V 4.5 and should
'be called winprbil.exe and saved in your trucklog directory
'you may modify this code as you see fit.
DIM ProBill$(55)
OPEN "temp.fil" FOR INPUT AS #1
FOR i = 1 TO 55
INPUT #1, ProBill$(i)
NEXT i
CLOSE #1
'The ProBill$() array is as follows
'ProBill$(1) Date of Load
'ProBill$(2) Shipper Name
'ProBill$(3) Shipper Address
'ProBill$(4) Shipper City
'ProBill$(5) Shipper State/Province
'ProBill$(6) Shipper Phone Number
'ProBill$(7) Freight Rate
'ProBill$(8) Freight Weight
'ProBill$(9) Freight Charges (Before tax)
'ProBill$(10) Freight Tax
'ProBill$(11) Freight Charges (After tax)
'ProBill$(12) Driver taking load on highway
'ProBill$(13) Highway Driver Hours/Miles
'ProBill$(14) Highway Driver Overtime/Other Bonus
'ProBill$(15) Highway Driver Safety Bonus
'ProBill$(16) Truck used on highway
'ProBill$(17) Trailer loaded with shipment
'ProBill$(18) Invoice Number
'ProBill$(19) Commodity
'ProBill$(20) Consignee Name
'ProBill$(21) Consignee Address
'ProBill$(22) Consignee City
'ProBill$(23) Consignee Province/State
'ProBill$(24) Consignee Phone Number
'ProBill$(25) Driver who loaded trailer
'ProBill$(26) Truck used for loading
'ProBill$(27) Hours/Miles paid for loading
'ProBill$(28) Overtime/Other bonus for loading
'ProBill$(29) Safety Bonus for loading
'ProBill$(30) Switch Commodity
'ProBill$(31) Special Instructions
'ProBill$(32) Company to deliver to
'ProBill$(33) Address to deliver to
'ProBill$(34) City to deliver to
'ProBill$(35) Province/State of company to deliver to
'ProBill$(36) Phone Number of company to deliver to
'ProBill$(37) Driver Delivering Load
'ProBill$(38) Hours/Miles for delivery driver
'ProBill$(39) Overtime/Other bonus for driver delivering load
'ProBill$(40) Safety Bonus for driver delivering load
'ProBill$(41) Truck Number used to deliver
'ProBill$(42) Switch at
'ProBill$(43) Time of switch
'ProBill$(44) Trailer Switched
'ProBill$(45) Truck Switched
'ProBill$(46) City Switch is going to
'ProBill$(47) Where to deliver switch
'ProBill$(48) Driver at Switch
'ProBill$(49) Hours/Miles for switch driver
'ProBill$(50) Overtime/Other bonus for switch driver
'ProBill$(51) Safety Bonus for switch Driver
'ProBill$(52) ETA
'ProBill$(53) Time Loaded
'ProBill$(54) Pickup Time
'ProBill$(55) Charged to (S=Shipper - C=Consignee - O=C.O.D.)
'Other Variables used are
'comdesc$ = description of the commodity
'pcol$ = prepaid or collect
CLS
'-------------------------------Do Not Change Above this Line-----------------
'This is the area you will want to make changes in
'Get Info On PrePaid or Collect Invoice
DO
INPUT "PrePaid or Collect (P/C) "; pcol$
pcol$ = UCASE$(pcol$)
IF pcol$ = "P" OR pcol$ = "C" THEN EXIT DO
LOOP
'Get the ProBill number
IF LEN(RTRIM$(ProBill$(18))) = 0 THEN
INPUT "Enter ProBill# "; ProBill$(18)
END IF
'Assert The Shipper is correct
PRINT "Load from "; RTRIM$(ProBill$(2)); " "; RTRIM$(ProBill$(4))
DO
INPUT "Correct "; yn$
IF UCASE$(yn$) = "Y" OR UCASE$(yn$) = "N" THEN EXIT DO
LOOP
IF UCASE$(yn$) = "Y" THEN
ProBill$(2) = RTRIM$(ProBill$(2))
ProBill$(4) = RTRIM$(ProBill$(4))
ELSE
DO
INPUT "Enter shipper name "; ProBill$(2)
INPUT "Enter City from "; ProBill$(4)
PRINT "Shipper "; ProBill$(2)
PRINT "From "; ProBill$(4)
INPUT "Correct "; yn$
yn$ = LEFT$(UCASE$(yn$), 1)
IF yn$ = "Y" THEN EXIT DO
LOOP
END IF
'Assert the Consignee is Correct
PRINT "Load Consignee "; RTRIM$(ProBill$(20)); " "; RTRIM$(ProBill$(22))
DO
INPUT "Correct "; yn$
IF UCASE$(yn$) = "Y" OR UCASE$(yn$) = "N" THEN EXIT DO
LOOP
IF UCASE$(yn$) = "Y" THEN
ProBill$(20) = RTRIM$(ProBill$(20))
ProBill$(22) = RTRIM$(ProBill$(22))
ELSE
DO
INPUT "Enter Consignee name "; ProBill$(20)
INPUT "Enter Consignee City "; ProBill$(22)
PRINT "Consignee "; ProBill$(20)
PRINT "City "; ProBill$(22)
INPUT "Correct "; yn$
yn$ = LEFT$(UCASE$(yn$), 1)
IF yn$ = "Y" THEN EXIT DO
LOOP
END IF
'Assert the Load is Being Delivered to the Proper Place
PRINT "Load deliver to "; RTRIM$(ProBill$(32)); " "; RTRIM$(ProBill$(34))
DO
INPUT "Correct "; yn$
IF UCASE$(yn$) = "Y" OR UCASE$(yn$) = "N" THEN EXIT DO
LOOP
IF UCASE$(yn$) = "Y" THEN
ProBill$(32) = RTRIM$(ProBill$(32))
ProBill$(34) = RTRIM$(ProBill$(34))
ELSE
DO
INPUT "Enter company to deliver to "; ProBill$(32)
INPUT "Enter City to deliver to "; ProBill$(34)
PRINT "Deliver to "; ProBill$(32)
PRINT "City "; ProBill$(34)
INPUT "Correct "; yn$
yn$ = LEFT$(UCASE$(yn$), 1)
IF yn$ = "Y" THEN EXIT DO
LOOP
END IF
'Get Number and Description of articles
INPUT "Description of articles "; comdesc$
INPUT "Please insert bill and press <ENTER> to print "; a$
'This is where the info is being printed on the printer
IF pcol$ = "C" THEN
LPRINT TAB(7); "X";
END IF
LPRINT TAB(10); ProBill$(20); " "; TAB(35); ProBill$(22)
LPRINT TAB(70); ProBill$(1)
LPRINT TAB(10); ProBill$(32); " "; ; TAB(35); ProBill$(34)
LPRINT
IF pcol$ = "P" THEN
LPRINT TAB(7); "X";
END IF
LPRINT TAB(10); ProBill$(2); " "; TAB(35); ProBill$(4)
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT TAB(4); ProBill$(19); TAB(10); " "; comdesc$;
LPRINT TAB(65); VAL(ProBill$(7))
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT TAB(65); VAL(ProBill$(10))
LPRINT
LPRINT TAB(65); VAL(ProBill$(11))
LPRINT CHR$(12)
'-------------------Do Not Change Below This Line-----------------------------
'Remove Temporary Data From Disk and Return to Main Program
KILL "temp.fil"
END